package com.qsd.doc4jsimpple.constants;

import lombok.Getter;

/**
 * * @Author xujunxia
 * * @Date 2024-11-06 15:13
 * * @Description TODO
 * * wb-0455@dtdream.com
 **/
@Getter
public enum HeadingLevelEnum {

    Heading1(1,"Heading1","1、一级标题1"),

    Heading2(2,"Heading2","1、二级标题1"),
    Heading3(3,"Heading3","1、三级标题1"),
    Heading4(4,"Heading4","1、四级标题1"),
    Heading5(5,"Heading5","1、五级标题1"),
    Heading6(6,"Heading6","1、六级标题1"),

    ;
    /**
     * 编号
     */
    private Integer level;
    /**
     * 名称
     */
    private String code;


    private String name;

    HeadingLevelEnum(Integer level,String code, String name) {
        this.level = level;
        this.code = code;
        this.name = name;
    }

    public static HeadingLevelEnum getByLevel(Integer level) {
        for (HeadingLevelEnum headingLevelEnum : HeadingLevelEnum.values()) {
            if (headingLevelEnum.getLevel()==level) {
                return headingLevelEnum;
            }
        }
        return null;
    }


}
